package com.gbei.center.oauth.req;

import com.gbei.center.req.open.ReqCommon;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 添加区县运营商请求参数
 *
 * @author lixuzhou@foxmail.com
 * @version 0.1 2018/11/5
 */
@Data
@ToString(callSuper = true)
@ApiModel(value = "添加区县运营商请求参数")
public class ReqAddOperator extends ReqCommon implements Serializable {

  private static final long serialVersionUID = -2430382023975681814L;

  @ApiModelProperty(value = "调用端业务主键", required = true, example = "ID_OPT_0001")
  @NotBlank(message = "bizId 不能为空")
  private String bizId;

  @ApiModelProperty(value = "运营区域ID", required = true, example = "440305")
  @NotNull(message = "areaId 不能为空")
  @Pattern(regexp = "^[1-9][0-9]{5}$",message = "areaId 由6位非0开头的数字组成")
  private String areaId;

  @ApiModelProperty(value = "运营商手机号", required = true, example = "15507552820")
  @NotBlank(message = "mobile 不能为空")
  private String mobile;
  
  @ApiModelProperty(value = "用户姓名", example = "李旭洲")
  private String userName;
  
  @ApiModelProperty(value = "用户身份证号", example = "440305199009091234")
  private String idcard;

  @ApiModelProperty(value = "邀请人openId（有openId表示一定的京贝尔系统的用户）", example = "1a209e0b341fd79a25481dc9f19cf8bf")
  private String inviteOpenId;

  public String getAreaId12() {
    return areaId + "000000";
  }
}
